<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib  uri="/struts-tags" prefix="s" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<link href="../styles/css/header.css" rel="stylesheet" type="text/css" />
		<link href="../styles/css/css.css" rel="stylesheet" type="text/css" />
        <link href="../styles/css/login_center.css" rel="stylesheet" type="text/css" />
        <script src="../scripts/jquery-1.7.2.js" type="text/javascript"></script>
		<title>开申请代理</title>
<script type="text/javascript">

function Nonullchecking(){
	var uname = $("#usernameTxt").val();
	var password = $("#password").val();
	if(uname==""){
		$(".Usersq:eq(0)").show();
	}else{
		$(".Usersq:eq(0)").hide();
	}
	if(password==""){
		$(".Usersq:eq(1)").show();
		
	}else {
		$(".Usersq:eq(1)").hide();
	}
}


$(function()
{	
	$.post("login!getRoles.action","",function(data)
	{	
		//alert(data);
		var $selectVal = $(eval(data));
		$selectVal.each(function()
		{
			$("#selectdAccount").append("<option value='"+this.value+"'>"+this.key+"</option>");
		});
	});
	
	//刷新验证码
	$("#imgcode").click(function(){
		$(this).attr({"src":"/until/imagecode.html?"+new Date()});
	 });
	
	$("#imageText").focus(function()
	{
		$("#spanInput").html("");
	}
	);
	
	//onblur
	
	
});


</script>

</head>

	<body id="headBody">
		<div class="header">
			<div class="header_container">
				<div class="logo1">
					<img src="../images/imgs/logo1.gif" />
				</div>
                            
            	<div class="login_right">
                	  <s:if test="#session.user.username == ''">
                <div class="login_users"><span class="text12b">您还未登陆!</span><span class="text12b"><a href="
     			../login/login.jsp">登陆</a></span></div>
                </s:if>
                
                <s:else>
                	<div class="login_users"><span class="text12b">登录者: ${sessionScope.user.username}</span><span class="text12b"><a href="login!loginOut.action">登出</a></span></div>
                   <div class="login_js"><span class="text12b">角色：${sessionScope.user.role.rnumber }</span></div>
                 </s:else>
                </div>
			</div>
		</div>
		
        <div class="nav_bg">
			<div class="nav">
            	<ul>
                   	<li><a href="../openaccount/openaccount.jsp">申请开户</a></li>
                    <li><a href="../recharges/usersall.jsp" >账户充值</a></li>
                     <li><a href="../Userqueries/Userqueries.jsp" >查询用户信息</a></li>
                    <li><a href="../account/account.jsp" >查询账单信息</a></li>
                </ul>
            </div>
 			
		</div>
        
        <div class="content_content">
        <div class="data_top" style="padding : 20px 0px 0px 170px;"><h3>*请填写开户资料</h3></div>
        <div class="data_layer">
        	<form action="/user/openAccount.html" method="post">
        	 <div class="data_input">
                <div class="data_input_text"><span class="text3">*&nbsp;&nbsp;代理职位：</span></div>
              <div class="data_input_round">
        	  	<select id="selectdAccount" name="role.rnumber">
        	  		<option value="">请选择权限</option>
        	  	</select>
        	  	
              </div>
                </div>
              

        	
            <div class="data_input">
                <div class="data_input_text"><span class="text3">*&nbsp;&nbsp;用户名：</span></div>
                <div class="data_input_round"><img src="../images/imgs/left1.png" /></div>
                <div class="data_input_round">
                  <input name="users.username" type="text" maxlength="100" id="username" class="input1" style="float:left; width:200px" tabindex="1" onblur="Nonullchecking()"/>
                </div>
                <div class="data_input_round"><img src="../images/imgs/right1.png" /></div>
                <div class="Usersq" style="display:none"><span class="text12red">用户名不能为空 .</span></div>
              </div>
              <div class="clear"></div>
              <div class="data_input">
                <div class="data_input_text"><span class="text3">*&nbsp;&nbsp;密码：</span></div>
                <div class="data_input_round"><img src="../images/imgs/left1.png" /></div>
                <div class="data_input_round">
                  <input id="password" name="users.password" type="password" maxlength="16" class="input1" style="float:left; width:200px" tabindex="2" onblur="Nonullchecking()"/>
                </div>
                <div class="data_input_round"><img src="../images/imgs/right1.png" /></div>
                <div class="Usersq" style="display:none"><span class="text12red">密码不能为空 .</span></div>
              </div>
              <div class="clear"></div>
        	<div class="data_input">
                <div class="data_input_text"><span class="text3">公司名：</span></div>
                <div class="data_input_round"><img src="../images/imgs/left1.png" /></div>
                <div class="data_input_round">
                  <input name="users.companyname" type="text" maxlength="100" id="companyname" class="input1" style="float:left; width:200px" tabindex="1" />
                </div>
                <div class="data_input_round"><img src="../images/imgs/right1.png" /></div>
              </div>
              <div class="clear"></div>
                      	<div class="data_input">
                <div class="data_input_text"><span class="text3">地址：</span></div>
                <div class="data_input_round"><img src="../images/imgs/left1.png" /></div>
                <div class="data_input_round">
                  <input name="users.address" type="text" maxlength="100" id="address" class="input1" style="float:left; width:200px" tabindex="1" />
                </div>
                <div class="data_input_round"><img src="../images/imgs/right1.png" /></div>
              </div>
              <div class="clear"></div>
                      	<div class="data_input">
                <div class="data_input_text"><span class="text3">联系电话:</span></div>
                <div class="data_input_round"><img src="../images/imgs/left1.png" /></div>
                <div class="data_input_round">
                  <input name="users.contact" type="text" maxlength="100" id="contact" class="input1" style="float:left; width:200px" tabindex="1" />
                </div>
                <div class="data_input_round"><img src="../images/imgs/right1.png" /></div>
              </div>
              <div class="clear"></div>
                      	<div class="data_input">
                <div class="data_input_text"><span class="text3">电子邮件：</span></div>
                <div class="data_input_round"><img src="../images/imgs/left1.png" /></div>
                <div class="data_input_round">
                  <input name="users.email" type="text" maxlength="100" id="email" class="input1" style="float:left; width:200px" tabindex="1" />
                </div>
                <div class="data_input_round"><img src="../images/imgs/right1.png" /></div>
              </div>
              <div class="clear"></div>
              
             
            
                             <div class="data_input">
                <div class="data_input_text"><span class="text3">真实姓名：</span></div>
                <div class="data_input_round"><img src="../images/imgs/left1.png" /></div>
                <div class="data_input_round">
                  <input name="username" type="text" maxlength="100" id="usernameTxt" class="input1" style="float:left; width:200px" tabindex="1" />
                </div>
                <div class="data_input_round"><img src="../images/imgs/right1.png" /></div>
              </div>
              <div class="clear"></div>
              
              <div class="data_input">
                <div class="data_input_text"><span class="text3">QQ：</span></div>
                <div class="data_input_round"><img src="../images/imgs/left1.png" /></div>
                <div class="data_input_round">
                  <input name="users.qq" type="text" maxlength="100" id="qq" class="input1" style="float:left; width:200px" tabindex="1" />
                </div>
                <div class="data_input_round"><img src="../images/imgs/right1.png" /></div>
              </div>
              <div class="clear"></div>
              
              
               <div class="data_input">
                <div class="data_input_text"><span class="text3">验证码：</span></div>
                <div class="data_input_round"><img src="../images/imgs/left1.png" /></div>
                <div class="data_input_round">
                  <input id="imageText"  name="imginput" type="text"  class="input1"  style="float:left; width:200px"  />
                  <img id="imgcode" src="/until/imagecode.html"/> <span class="text8">点击图片刷新验证码</span>
                  <p id="spanInput" style="padding-left:-100px;">${requestScope.input }</p>
                  
                </div>
                <div class="data_input_round"><img src="../images/imgs/right1.png" /></div>
                
              </div>
              
              <div class="clear"></div>
                </div>
                <div class="data_input_round"><img src="../images/imgs/right1.png" /></div>
              </div>
              <div class="clear"></div>
           	  <div style="text-align:center"><label id="msgLbl" class="text3"></label></div>
          <div class="data_input">
                <div class="data_check"><input type="submit" value="" class="submit_ok"/></div>
          </div>
        </form>
        	
        </div>
		</div>	
            
</body>
</html>

